// $Id$
// vim:ft=javascript

ARG_WITH("ctpp", "for ctpp2 support", "yes");
ARG_WITH("iconv", "for iconv support", "yes");
ARG_ENABLE("pgi", "Generate PGO instrumented binaries", "no");
ARG_WITH("pgo", "Compile optimized binaries using training data from folder", "no");

if (PHP_CTPP != "no")
{
	if (CHECK_LIB("ctpp2.lib", "ctpp", PHP_CTPP) &&
	    (CHECK_LIB("lib\\iconv.lib", "ctpp", PHP_ICONV) ||
	     CHECK_LIB("iconv.lib", "ctpp", PHP_ICONV)) &&
	    CHECK_HEADER_ADD_INCLUDE("CDT.hpp", "CFLAGS_CTPP", PHP_CTPP + "\\include\\ctpp2"))
	{
		EXTENSION("ctpp", "empty.c m_ctpp.cpp php_ctpp.cpp");
	}
	else
	{
		ERROR("Provide path to ctpp and iconv libs and headers: configure.bat --with-ctpp=... --with-iconv=...");
	}
}
